import { ajaxService } from '@/utils/request';

const env = import.meta.env;
// let baseURL = env.VITE_API_BASE_URL;
let baseURL = env.VITE_INVENTORY_URL;

// 获取收货列表
export function GetGroundingAll(params?: any) {
  return ajaxService({
    url: '/warehouse/grounding/getall',
    method: 'get',
    baseURL,
    params,
  });
}

// 确认上架
export function postGrounding(data?: any) {
  return ajaxService({
    url: '/warehouse/entry/confirm',
    method: 'post',
    baseURL,
    data,
  });
}

// 获取该物料上架明细
export function getWarehouseGroundingGetone(params?: any) {
  return ajaxService({
    url: '/warehouse/grounding/getone',
    method: 'get',
    params,
    baseURL,
  });
}

// 开始上架
export function postWarehouseGrounding(data: any) {
  return ajaxService({
    url: '/warehouse/grounding/post',
    method: 'post',
    data,
    baseURL,
  });
}

// 获取入库数据详情
export function getWarehouseGrounding(params?: any) {
  return ajaxService({
    url: '/warehouse/grounding/get',
    method: 'get',
    params,
    baseURL,
  });
}

// 获取入库单详情
export function getStorageOne(params?: any) {
  return ajaxService({
    url: '/warehouse/storage/getOne',
    method: 'get',
    baseURL,
    params,
  });
}
